<template>
    <div class="app-container">
        <el-card class="box-card" shadow="always" v-show="showSearch">
            <el-form :model="queryParams" ref="queryForm"  :inline="true" label-width="68px">
                <el-form-item label="客户名称" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入客户名称" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="商品名称" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入商品名称" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="货号" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入货号" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="条码" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入条码" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="商品品牌" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入商品品牌" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="报价时间" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入报价时间" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="报价人" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入报价人" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item label="进展进度" prop="orderNo">
                    <el-input v-model="queryParams.orderNo" placeholder="请输入客户名称" clearable
                        @keyup.enter="handleQuery" />
                </el-form-item>
                <el-form-item>
                    <el-button type="primary"  @click="handleQuery">搜索</el-button>
                    <el-button   @click="resetQuery">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>

        <el-card class="box-card" shadow="always" :body-style="{ padding: '20px' }">
            <template #header>
                <div >
                <el-row :gutter="10" class="mb8">
                    
                    <el-radio-group v-model="queryParams.status" @change="handleQuery">
                        <el-radio-button v-for="(item,index) in statusArr" :key="index" :label="item.value" >{{ item.label }}</el-radio-button>
                    </el-radio-group>
                    <right-toolbar :v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
                </el-row>
            </div>
            </template>
            <!-- card body -->
            <!-- <el-row :gutter="10" class="mb8">
                <el-col :span="1.5">
                    <el-button type="primary"  icon="el-icon-plus"  @click="handleAdd"
                        v-hasPermi="['plan:order:add']">添加报价单
                    </el-button>
                </el-col>
                <el-col :span="1.5">
                    <el-button type="danger"  icon="el-icon-delete"  :disabled="multiple"
                        @click="handleDelete" v-hasPermi="['plan:order:remove']">删除
                    </el-button>
                </el-col>
                <right-toolbar :v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
            </el-row> -->

            <el-table v-loading="loading" :data="dataSource" @selection-change="handleSelectionChange">
                <el-table-column type="selection" width="55" align="center" :selectable="selectHandle" />
                <el-table-column label="#" type="index"> </el-table-column>
                <el-table-column label="方案名称" align="center" prop="warehouseName" />
                <el-table-column label="日期" align="center" prop="warehouseName" width="150" />
                <el-table-column label="商品数量" align="center" prop="warehouseName" />
                <el-table-column label="平均单价" align="center" prop="warehouseName" />
                <el-table-column label="制单人" align="center" prop="warehouseName" />
                <el-table-column label="操作" align="center" prop="orderStatus">
                    <template #default="scope">
                        
                    </template>
                </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" v-model:page.sync="queryParams.pageNum"
                v-model:limit.sync="queryParams.pageSize" @pagination="getList" />
        </el-card>
        <addForm ref="modelForm"></addForm>
    </div>
</template>
  
<script>
import addForm from './modules/addForm.vue';
import listMixin from '@/mixins/listMixin';
export default {
    name: "quotationTracking",
    dicts: ["inventory_status", "counting_method"],
    components: {
        addForm
    },
    mixins: [listMixin],
    data() {
        return {
            showSearch: true, // Whether to show the search form
            queryParams: { // Query parameters for the table
                orderNo: '', // 方案名称
                creator: '', // 制单人
                status:'1',
                pageNum: 1, // Current page number
                pageSize: 10, // Number of records per page
            },
            dateRange: [], // Date range for the created time
            loading: false, // Loading state of the table
            dataSource: [], // Data for the table
            total: 0, // Total number of records
            multiple: false, // Whether multiple rows are selected
            statusArr:[
                {label:'全部',value:'1'},
                {label:'未审核',value:'2'},
                {label:'已审核',value:'3'},
                {label:'已拒绝',value:'4'},
            ],
            urls: {
                list: '/order/quotationProgress/list',
                delete: '/order/goods',
            }
        };
    },
};
</script>
  <style type="text/css" scoped>
    .box-card {
        margin-bottom: 10px;
    }
  </style>